import { get, post, put, del } from './request'

const API = {
  getHomeBanner: () => {
    return get('home/banner').then((res) => res.data)
  },
  getHomeNav: () => {
    return get('home/nav').then((res) => res.data)
  },
  getHomeNews: () => {
    return get('home/new').then((res) => res.data)
  },
  getHomeCake: () => {
    return get('home/cake').then((res) => res.data)
  },
  getHomeFineProducts: () => {
    return get('home/fineProducts').then((res) => res.data)
  },
  getHomeCommodity: () => {
    return get('home/commodity').then((res) => res.data)
  },
  // getEmployees: () => {
  //   return get('employees')
  //     .then(res => res.data);
  // },
  // createEmployee: param => {
  //   return post('employees', param)
  //     .then(res => res.data);
  // },
  // editorEmployee: (param, data) => {
  //   return put(`employees/${param}`, data)
  //     .then(res => res.data);
  // },
  // deleteEmployee: param => {
  //   return del('employees/' + param)
  //     .then(res => res.data);
  // }
}

export default API
